package com.bytedance.common.b;

import android.annotation.TargetApi;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.os.Build;
import android.webkit.WebView;

public final class g {
    static class a {
        a(byte arg1) {
            this();
        }

        private a() {

        }

        public void a() {
        }

        public void a(AlarmManager arg2, int arg3, long arg4, PendingIntent arg6) {
            if (arg2 != null) {
                try {
                    arg2.set(arg3, arg4, arg6);
                } catch (Throwable v0) {
                }
            }
        }
    }

    @TargetApi(value = 19)
    static final class b extends a {
        b(byte arg1) {
            this();
        }

        private b() {
            super((byte) 0);
        }

        public final void a() {
            try {
                WebView.setWebContentsDebuggingEnabled(true);
            } catch (Exception v0) {
            }
        }

        public final void a(AlarmManager arg2, int arg3, long arg4, PendingIntent arg6) {
            if (arg2 != null) {
                try {
                    arg2.setExact(arg3, arg4, arg6);
                } catch (Throwable v0) {
                    if (!(v0 instanceof NoSuchMethodError)) {
                        return;
                    }

                    if (arg2 == null) {
                        return;
                    }

                    try {
                        arg2.set(arg3, arg4, arg6);
                    } catch (Throwable v1) {
                    }
                }
            }
        }
    }

    private static a a;

    static {
        g.a = Build.VERSION.SDK_INT >= 19 ? new b((byte) 0) : new a((byte) 0);
    }

    public static void a() {
        g.a.a();
    }

    public static void a(AlarmManager arg8, int arg9, long arg10, PendingIntent arg12) {
        g.a.a(arg8, arg9, arg10, arg12);
    }
}

